import request from '@/utils/request'

/**
 * @description: 获取员工列表数据
 * @param:{page, size}
 */
export function getEmployee(page, size) {
  return request({
    url: '/sys/user',
    params: {
      page, size
    }
  })
}

/**
 * @description: 新增员工
 * @param:{data}
 */
export function addEmployee(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}

/**
 * @description: 删除角色
 * @param {*} id 角色id
 * @return {*}
 */
export function delEmployee(id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'delete',
    id
  })
}

/**
 * @description: 批量导入员工 导入excel
 * @param {*} data
 * @return {*}
 */
export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
